//
//  YDYMineController.m
//  DY_Bilibili
//
//  Created by 杨德勇 on 2016/10/7.
//  Copyright © 2016年 杨德勇. All rights reserved.
//

#import "YDYMineController.h"

#import <UIImage+YYAdd.h>
@interface YDYMineController ()

@property (weak, nonatomic) IBOutlet UIButton *profileBtn;
@property (weak, nonatomic) IBOutlet UILabel *userName;
@property (weak, nonatomic) IBOutlet UILabel *VIP;
@property (weak, nonatomic) IBOutlet UILabel *corns;
@property (weak, nonatomic) IBOutlet UIImageView *vipLevel;
@property (weak, nonatomic) IBOutlet UIImageView *sex;
@property (weak, nonatomic) IBOutlet UIButton *settingBtn;
@property (weak, nonatomic) IBOutlet UIButton *arrow;
@property (weak, nonatomic) IBOutlet UIView *container;
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;

@end

@implementation YDYMineController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
    
    
    
}
-(void)setupUI{
    self.navigationController.navigationBarHidden = YES;
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.arrow.tintColor = [UIColor whiteColor];
    
    [self.view layoutIfNeeded];
    //加300 目的就是让蒙版加长300，防止下方显示出背景；
    UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, self.scrollView.width, self.scrollView.height + 300)  byRoundingCorners:UIRectCornerTopRight | UIRectCornerTopLeft cornerRadii:CGSizeMake(8, 8)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc]init];
    maskLayer.frame = self.scrollView.bounds;
    maskLayer.path = path.CGPath;
    
    self.scrollView.layer.mask = maskLayer;

    
    [self.profileBtn setBackgroundImage:[[UIImage imageNamed:@"avatar3"] ydy_circleImage]forState:UIControlStateNormal];
    
    
}
- (IBAction)NormalbuttomDidClick:(UIButton *)sender {
    YDYLog(@"click:'%@'buttom",sender.titleLabel.text);
}



@end
